package xyz.syyrjx.mapper;

import org.springframework.stereotype.Component;
import xyz.syyrjx.entity.Order;
import xyz.syyrjx.entity.User;

import java.util.ArrayList;
import java.util.List;

/**
 * 模拟订单映射接口
 * @author Mr.Wan
 * @date 2022/10/11 - 20:21
 */
@Component
public class OrderMapper {
    /**
     * 模拟返回订单数据
     * @param user 用户信息
     * @return 模拟订单数据
     */
    public List<Order> selectOrderByUid(User user){
        Integer uid = user.getUid();
        List<Order> orderList = new ArrayList<>();
        orderList.add(new Order(11L,uid,"1234561921681881001167"));
        orderList.add(new Order(25L,uid,"1234561921681881003456"));
        orderList.add(new Order(413L,uid,"123456192168188108923"));
        orderList.add(new Order(456L,uid,"1234561921681881006678"));
        return orderList;
    }
}
